// 创建store仓库 应用中间件方法
import { createStore, applyMiddleware } from 'redux'
// 可视化的插件
import { composeWithDevTools } from 'redux-devtools-extension'
// 引入异步中间件
import thunk from 'redux-thunk'
import reducer from './reducers'
import { getToken } from '@/utils/storage'
console.log(getToken())

export default createStore(
  reducer,
  {
    login: getToken() || {},
  },
  composeWithDevTools(applyMiddleware(thunk))
)
